#ifndef MIRAGON_TYPES_HPP
#define MIRAGON_TYPES_HPP

#include "config.h"
#include <functional>
#include <memory>
#include <string>

#if defined(_MSC_VER)
# if defined(miragon_EXPORTS)
#  define MIRAGON_API __declspec(dllexport)
# else
#  if defined(MIRAGON_STATIC_LIBS)
#   define MIRAGON_API
#  else
#   define MIRAGON_API __declspec(dllimport)
#  endif
# endif
#else
#define MIRAGON_API
#endif

namespace miragon {

class EventLoop;

using DelayedTaskFun = std::function<void()>;
using EventLoopPtrRef = std::shared_ptr<EventLoop>;

// Helper class for std::make_shared/make_unique with protected contructor.
template <typename S>
struct enable_make : public S {
    template <typename... T>
    enable_make(T&&... t) : S(std::forward<T>(t)...)
    {
    }
};

} // namespace miragon

#endif // MIRAGON_TYPES_HPP